#ifndef __REDISCACHE_H__
#define __REDISCACHE_H__
#include <hiredis/hiredis.h>
#include <iostream>
#include "json.hpp"

using namespace std;
using json = nlohmann::json;

class RedisCache
{
public:
    RedisCache();
    ~RedisCache();
    bool connect(const string &host,int port);
    void set(string key,string value);
    void keySet(string key,string value);
    void webSet(string key,string value);
    string getKey(string key);
    string getWeb(string key);

private:
    redisContext *_pConnect;
    redisReply *_pReply;
};

#endif